package com.hl.secondHand.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hl.secondHand.common.vo.EasyForum;
import com.hl.secondHand.entity.Forum;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hl
 * @since 2021-06-06
 */
@Component
public interface ForumMapper extends BaseMapper<Forum> {
    @Select("select f.id,f.gid,f.uid,f.content,f.created_date,u.name from forum f,user u where f.uid = u.id and f.gid = #{gid}")
    List<EasyForum> getEasyForum(int gid);
}
